package com.alone.openai.api.core.param;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

/**
 * @author Alone
 * @date 2023/3/23 4:37 下午
 */
@Data
public class EmbeddingParam {

    /**
     * Required
     * <p>
     * ID of the model to use.
     * You can use the List models API to see all of your available models,
     * or see our Model overview for descriptions of them.
     * <p>
     * 必填项
     * 要使用的模型的ID。您可以使用 “列表模型” API查看所有可用的模型，或者查看我们的模型概述以了解它们的描述。
     */
    private String model;

    /**
     * Required
     * <p>
     * Input text to get embeddings for, encoded as a string or array of tokens.
     * To get embeddings for multiple inputs in a single request, pass an array of strings or array of token arrays.
     * Each input must not exceed 8192 tokens in length.
     * <p>
     * 输入文本以获取嵌入，编码为令牌的字符串或数组。
     * 要在单个请求中获取多个输入的嵌入，请传递字符串数组或令牌数组数组。
     * 每个输入的长度不得超过8192个标记。
     */
    private String input;

    /**
     * A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
     * <p>
     * 代表您的最终用户的唯一标识符，可以帮助OpenAI监视和检测滥用行为。
     * <p>
     * https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String user = null;
}
